<template>
  <div class="viewimg" v-if="isShow" @click.self="closeView">
      <!-- <img src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1135600071,45544589&fm=26&gp=0.jpg" /> -->
      <img :src="src" />
  </div>
</template>

<script>
  export default {
    props:{
      src:{
        type:String,
        required:true
      },
      isShow:{
        type:Boolean,
        default:false
      }
    },
    data() {
      return {
      }
    },
    methods:{
      closeView(){
        this.$emit("closeView",false)
      }
    }
  }
</script>

<style scoped>
    .viewimg{
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      background: rgba(0,0,0,.2);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 11;
    }

    .viewimg img{
      width: 90%;
    }
</style>
